package com.ebase.core.page;

public class Pageable {

    protected int pageSize;

    protected int pageNumber;

    public int getPageSize() {
        if (pageSize <= 0)
            pageSize = 10;
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getPageNumber() {
        if (pageNumber <= 0)
            pageNumber = 1;
        return pageNumber;
    }

    public void setPageNumber(int pageNumber) {
        this.pageNumber = pageNumber;
    }

    public int getOffset() {
        return getPageSize() * getPageNumber();
    }

    public void setOffset(int offset) {

    }

}
